package jt.classic.app.info.impl;

import jt.classic.app.info.AInfoDirectory;

import org.limp.basework.AbstractSimpleBean;

import java.util.Map;


/**
 * 信息类别实现类
 *
 * @author Bizkit
 *
 */
public class AInfoDirectoryImpl extends AbstractSimpleBean
    implements AInfoDirectory {
    private String id;
    private String name;
    private String memo;
    private String key;
    private String parentid;
    private String haschild;
    private String userid;
    private String username;
    private String date;
    private String order;
    private String path;
    private String textpath;

    public String id() {
        return this.id;
    }

    public String iname() {
        return this.name;
    }

    public String imemo() {
        return this.memo;
    }

    public String ikey() {
        return this.key;
    }

    public boolean isroot() {
        return "0".equals(this.id);
    }

    public boolean hasChildren() {
        return "true".equals(haschild);
    }

    public String iparentid() {
        return this.parentid;
    }

    public String iuserid() {
        return this.userid;
    }

    public String iusername() {
        return this.username;
    }

    public String idate() {
        return this.date;
    }

    public String iorder() {
        return this.order;
    }
    
    public String iextpath(){
    	return this.path;
    }
    
    public String iextpathtext(){
    	return this.textpath;
    }

    public void reload(Map info) {
        if (info != null) {
            this.info = info;

            this.id = (String) info.get("ID_ID");
            this.name = (String) info.get("ID_NAME");
            this.memo = (String) info.get("ID_MEMO");
            this.key = (String) info.get("ID_KEY");
            this.parentid = (String) info.get("ID_PARENT");
            this.haschild = (String) info.get("HASCHILD");
            this.userid = (String) info.get("ID_USERID");
            this.username = (String) info.get("ID_USERNAME");
            this.date = (String) info.get("ID_DATE");
            this.order = (String) info.get("ID_ORDER");
            this.path = (String) info.get("EXT_DPATH");
            this.textpath = (String) info.get("EXT_DPATHTEXT");
        }
    }
}
